<?php
/**
 * TOP API: taobao.refunds.receive.get request
 * 
 * @author auto create
 * @since 1.0, 2012-04-17 12:36:56
 */
class RefundsReceiveGetRequest
{
    /** 
     * 买家昵称
     **/
    private $buyerNick;
    
    /** 
     * 查询修改时间结束。格式: yyyy-MM-dd HH:mm:ss
     **/
    private $endModified;
    
    /** 
     * 需要返回的字段。目前支持有：refund_id, tid, title, buyer_nick, seller_nick, total_fee, status, created, refund_fee, oid, good_status, company_name, sid, payment, reason, desc, has_good_return, modified, order_status
     **/
    private $fields;
    
    /** 
     * 页码。取值范围:大于零的整数; 默认值:1
     **/
    private $pageNo;
    
    /** 
     * 每页条数。取值范围:大于零的整数; 默认值:40;最大值:100
     **/
    private $pageSize;
    
    /** 
     * 查询修改时间开始。格式: yyyy-MM-dd HH:mm:ss
     **/
    private $startModified;
    
    /** 
     * 退款状态，默认查询所有退款状态的数据，除了默认值外每次只能查询一种状态。
WAIT_SELLER_AGREE(买家已经申请退款，等待卖家同意) 
WAIT_BUYER_RETURN_GOODS(卖家已经同意退款，等待买家退货) 
WAIT_SELLER_CONFIRM_GOODS(买家已经退货，等待卖家确认收货) 
SELLER_REFUSE_BUYER(卖家拒绝退款) 
CLOSED(退款关闭) 
SUCCESS(退款成功)
     **/
    private $status;
    
    /** 
     * 交易类型列表，一次查询多种类型可用半角逗号分隔，默认同时查询guarantee_trade, auto_delivery的2种类型的数据。
fixed(一口价) 
auction(拍卖) 
guarantee_trade(一口价、拍卖) 
independent_simple_trade(旺店入门版交易) 
independent_shop_trade(旺店标准版交易) 
auto_delivery(自动发货) 
ec(直冲) 
cod(货到付款) 
fenxiao(分销) 
game_equipment(游戏装备) 
shopex_trade(ShopEX交易) 
netcn_trade(万网交易) 
external_trade(统一外部交易)
     **/
    private $type;
    
    private $apiParas = array();
    
    public function setBuyerNick($buyerNick)
    {
        $this->buyerNick = $buyerNick;
        $this->apiParas["buyer_nick"] = $buyerNick;
    }

    public function getBuyerNick()
    {
        return $this->buyerNick;
    }

    public function setEndModified($endModified)
    {
        $this->endModified = $endModified;
        $this->apiParas["end_modified"] = $endModified;
    }

    public function getEndModified()
    {
        return $this->endModified;
    }

    public function setFields($fields)
    {
        $this->fields = $fields;
        $this->apiParas["fields"] = $fields;
    }

    public function getFields()
    {
        return $this->fields;
    }

    public function setPageNo($pageNo)
    {
        $this->pageNo = $pageNo;
        $this->apiParas["page_no"] = $pageNo;
    }

    public function getPageNo()
    {
        return $this->pageNo;
    }

    public function setPageSize($pageSize)
    {
        $this->pageSize = $pageSize;
        $this->apiParas["page_size"] = $pageSize;
    }

    public function getPageSize()
    {
        return $this->pageSize;
    }

    public function setStartModified($startModified)
    {
        $this->startModified = $startModified;
        $this->apiParas["start_modified"] = $startModified;
    }

    public function getStartModified()
    {
        return $this->startModified;
    }

    public function setStatus($status)
    {
        $this->status = $status;
        $this->apiParas["status"] = $status;
    }

    public function getStatus()
    {
        return $this->status;
    }

    public function setType($type)
    {
        $this->type = $type;
        $this->apiParas["type"] = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function getApiMethodName()
    {
        return "taobao.refunds.receive.get";
    }
    
    public function getApiParas()
    {
        return $this->apiParas;
    }
    
    public function check()
    {
        
        RequestCheckUtil::checkNotNull($this->fields,"fields");
        RequestCheckUtil::checkMinValue($this->pageNo,1,"pageNo");
        RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
        RequestCheckUtil::checkMinValue($this->pageSize,1,"pageSize");
    }
}
